package cn.zn.modules.pz.cur.entity;

import cn.zn.framework.common.abs.AbsOldMainEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "tpb_trip_traffic")
public class TpbTripTraffic extends AbsOldMainEntity {

    @NotBlank
    @TableField(value = "END_PLACE_")
    private String endPlace;

    @NotNull
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @TableField(value = "endTime")
    private Date endTime;

    @TableField(value = "expenseUnit")
    private String expenseUnit;

    @TableField(value = "NUMBER_")
    private Integer number;

    @TableField(value = "PRICE_")
    private Double price;

    @NotBlank
    @TableField(value = "START_PLACE_")
    private String startPlace;

    @NotNull
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @TableField(value = "startTime")
    private Date startTime;

    @TableField(value = "TOTAL_PRICE_")
    private Double totalPrice;

    @TableField(value = "TRAFFIC_")
    private String traffic;

    @TableField(value = "TP_SPENDING_ID_")
    private String tpSpendingId;

    @NotBlank
    @TableField(exist = false)
    private String mainId;
}